// 歌单评论
const Http = require('../../util/request');

module.exports = (query, request) => {
    // console.log(query)
    // query.query.cookie.os = 'pc'
    const data = {
        rid: query.query.id,
        limit: query.query.limit || 20,
        offset: query.query.offset || 0,
        beforeTime: query.query.before || 0
    };
    Http(
        'POST', `https://music.163.com/weapi/v1/resource/comments/A_PL_0_${query.query.id}`, data,
        {crypto: 'weapi', cookie: query.query.cookies, proxy: query.proxy}
    ).then(res => {
        request.json(res)
    }).catch( err => {
        request.json(err)
    })
};
